<?php
//$contentType = strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === false ? 'text/html' : 'application/xhtml+xml';
//header("Content-Type: $contentType; charset=utf-8");
session_start();
require_once('/etc/acb/config.php');
require_once(ROOT.'controlador/controle_erro/AplicacaoErro.class.php');
	
try{
	require_once(ROOT . 'fabrica_acao.php');
}catch (ProgramacaoErro $e){
	if(PRODUCAO){
		//TODO implementar log Texto mandar e-mail etc e tal.	
	}else{
		echo ('VERIFICAR ERRO DE PROGRAMAÇÃO!');
		echo ('<pre>');
		echo $e;
		echo ('</pre>');
		require_once(ROOT . 'fabrica_acao.php');
	}
}catch (Exception $e){
	header("Content-Type: text/html; charset=utf-8");
	echo ('ERRO!');
	echo ('<pre>');
	echo $e;
	echo ('</pre>');
}
?>